package main

import (
	"fmt"
)

func main() {
	//fmt.Println("goto案例")
	//	fmt.Println("从0到Go语言微服务架构师")
	//	goto label
	//	fmt.Println("Go语言微服务架构核心22讲")
	//	//var x int = 36
	//label:
	//	fmt.Println("《Go语言极简一本通》")

	sum := cal(10, 20)
	fmt.Println(sum)

	var num3 int = 30
	var num4 int = 40
	//sum1 := cal(num3, num4)
	//fmt.Println(sum1)
	fmt.Printf("交换前的两个数：num3 = %d,  num4 =  %d\n", num3, num4)
	exchangeNum(num3, num4)
	fmt.Printf("交换后的两个数：num3 = %d,  num4 =  %d\n", num3, num4)

}

func exchangeNum(num3 int, num4 int) {
	var t int
	t = num3
	num3 = num4
	num4 = t
	fmt.Println(num3, num4)

}

func cal(i int, i2 int) int {
	var sum int = 0
	sum = i + i2
	return sum
}
